<?php
class Page_Model extends ORM {
	
	protected $table_name = 'page';
	protected $primary_key = 'page_id';
	protected $col_order = 'page_order';
	protected $col_active = 'page_active';
	protected $sorting = array('page_id' => 'desc');
	
	public function get()
	{
		$this->db->from($this->table_name);
		$this->db->select('*');
		$this->db->orderby($this->col_order,'desc');
		$this->db->orderby($this->primary_key,'desc');
		return $this->db->get();
	}
	
	public function get_with_active()
	{
		$this->db->where($this->col_active,'1');
		return $this->get();
	}
}
?>